Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RayJob] Add Failure Feedback (log and event) for Failed k8s Creation Task #2306

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

tinaxfwu
Copy link
Contributor

@tinaxfwu tinaxfwu commented Aug 14, 2024

Why are these changes needed?

When a Kubernetes Job cannot be successfully created, it logs the error and generates an event for the failed job creation.

Related issue number

Refer to #2210

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@tinaxfwu tinaxfwu marked this pull request as ready for review August 15, 2024 05:34
@@ -508,6 +508,8 @@ func (r *RayJobReconciler) createNewK8sJob(ctx context.Context, rayJobInstance *

// Create the Kubernetes Job
if err := r.Client.Create(ctx, job); err != nil {
logger.Error(err, "Failed to create new Kubernetes Job")
r.Recorder.Eventf(rayJobInstance, corev1.EventTypeWarning, "k8sJobCreationFailed", "Failed to create new Kubernetes Job %s: %v", job.Name, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"k8sJobCreationFailed" looks good to me. Would you mind changing the below "Created" to "k8sJobCreationCreated" as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@kevin85421 kevin85421 merged commit 8f06197 into ray-project:master Sep 18, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants